From: Florian Müllner Date: Tue, 24 Jul 2018 09:49:00 +0000 (+0200) Subject: cleanup: Don't call method via a parent's prototype X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~41 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1b31fd5afed1c478bab0a00fe108d15bcbc14297;p=gnome-shell.git cleanup: Don't call method via a parent's prototype We cannot disconnect a signal handler via the usual disconnect() as nm_device_disconnect() shadows the GObject method, but we can use g_signal_handler_disconnect(). https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/626 --- diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 1f7f80765..8f128da15 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -331,11 +331,11 @@ var NMConnectionDevice = class NMConnectionDevice extends NMConnectionSection { destroy() { if (this._stateChangedId) { - GObject.Object.prototype.disconnect.call(this._device, this._stateChangedId); + GObject.signal_handler_disconnect(this._device, this._stateChangedId); this._stateChangedId = 0; } if (this._activeConnectionChangedId) { - GObject.Object.prototype.disconnect.call(this._device, this._activeConnectionChangedId); + GObject.signal_handler_disconnect(this._device, this._activeConnectionChangedId); this._activeConnectionChangedId = 0; } @@ -1187,11 +1187,11 @@ var NMDeviceWireless = class { destroy() { if (this._activeApChangedId) { - GObject.Object.prototype.disconnect.call(this._device, this._activeApChangedId); + GObject.signal_handler_disconnect(this._device, this._activeApChangedId); this._activeApChangedId = 0; } if (this._stateChangedId) { - GObject.Object.prototype.disconnect.call(this._device, this._stateChangedId); + GObject.signal_handler_disconnect(this._device, this._stateChangedId); this._stateChangedId = 0; } if (this._strengthChangedId > 0) {